package com.itjason.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Author:JasonLong
 * Date:2023/5/11
 */
@Configuration
public class MybatisPlusConfiguration {

    //配置分页拦截器(不配置将无法使用IPage实现分页）
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setLimit(500);
        return paginationInterceptor;
    }
}
